/*
 * Copyright (C) 2017 Pingan, Inc. All Rights Reserved.
 */

package com.pingan.haofang.searchcloud.indexdatasource.dto;

import java.util.List;

/**
 * 数据构建任务DTO
 *
 * @author zhangbi617
 * @date 23/05/2017
 */
public class ScheduleTaskDto {
    /**
     * 索引名称
     */
    private String indexName;

    /**
     * 索引Id
     */
    private Long indexId;

    /**
     * 项目code
     */
    private String projectCode;

    /**
     * 定时配置
     */
    private String cron;


    /**
     * 增量定时配置
     */
    private String incCron;

    /**
     * 数据源列表
     */
    private List<IndexDatasourceDTO> indexDatasourceDTOs;

    public String getIndexName() {
        return indexName;
    }

    public void setIndexName(String indexName) {
        this.indexName = indexName;
    }

    public String getProjectCode() {
        return projectCode;
    }

    public void setProjectCode(String projectCode) {
        this.projectCode = projectCode;
    }

    public String getCron() {
        return cron;
    }

    public void setCron(String cron) {
        this.cron = cron;
    }

    public List<IndexDatasourceDTO> getIndexDatasourceDTOs() {
        return indexDatasourceDTOs;
    }

    public void setIndexDatasourceDTOs(List<IndexDatasourceDTO> indexDatasourceDTOs) {
        this.indexDatasourceDTOs = indexDatasourceDTOs;
    }

    public Long getIndexId() {
        return indexId;
    }

    public void setIndexId(Long indexId) {
        this.indexId = indexId;
    }

    public String getIncCron() {
        return incCron;
    }

    public void setIncCron(String incCron) {
        this.incCron = incCron;
    }

    @Override
    public String toString() {
        return "ScheduleTaskDto{" +
                "indexName='" + indexName + '\'' +
                ", indexId=" + indexId +
                ", projectCode='" + projectCode + '\'' +
                ", cron='" + cron + '\'' +
                ", incCron='" + incCron + '\'' +
                ", indexDatasourceDTOs.size=" + (indexDatasourceDTOs == null ? 0 : indexDatasourceDTOs.size()) +
                '}';
    }
}
